﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace LuShanTea.Front.Web.Models
{
    public class OrderSubmitModel
    {
        [Range(1, int.MaxValue, ErrorMessage = "没有找到该商品")]
        public long OrderId { get; set; }

        [Range(1, int.MaxValue, ErrorMessage = "没有找到该地址")]
        public long AddressId { get; set; }

        [Range(1, int.MaxValue, ErrorMessage = "没有找到该快递方式")]
        public long ExpressId { get; set; }

        [Range(1, int.MaxValue, ErrorMessage = "没有找到该支付方式")]
        public long PayWayId { get; set; }

        [Range(1, int.MaxValue, ErrorMessage = "没有找到该付款方式")]
        public long ReceiptId { get; set; }

        [StringLength(50, ErrorMessage = "留言长度不能超过50个")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]{0,200}$", ErrorMessage = "留言中出现非法字符")]
        public string LeaveWord { get; set; }
    }
}